package com.atm.thirdplt.web.controller.busi;

import com.atm.thirdplt.common.core.domain.AjaxResult;
import com.atm.thirdplt.component.HisDataHandler;
import com.atm.thirdplt.service.IHisInfQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 医院His系统数据同步
 *
 * @author wenyf
 */
@Api(tags = "医院lis系统数据同步")
@RestController
@RequestMapping("/lis")
public class LisDataController {

    @Autowired
    private HisDataHandler hisDataHandler;

    @ApiOperation(value = "病人检验申请记录同步", notes = "病人检验申请记录同步")
    @GetMapping("/labDataSync")
    public AjaxResult labDataSync(@RequestParam(name = "patientId") String patientId,
                                  @RequestParam(name = "visitId", required = false) String visitId,
                                  @RequestParam(name = "inpNo", required = false) String inpNo) {

        hisDataHandler.syncLabInf(patientId, visitId, inpNo);
        return AjaxResult.success();
    }

}
